/* ------------------- Top left panel ------------------- */

.topLeftOfflineLogo {
	color: var(--tla-color-text-1);
	margin-top: -4px;
	padding: 4px 8px 4px 10px;
	height: 40px;
	display: flex;
	align-items: center;
}

.topLeftPanel {
	flex: 0 0 auto;
	border-top: 4px solid var(--tl-color-background);
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	pointer-events: all;
	white-space: nowrap;
	background-color: var(--tl-color-background);
	border-bottom-right-radius: 11px;
	padding-left: 2px;
	width: 100%;
	max-width: 100%;
	min-width: 0px;
	overflow: hidden;
	color: var(--tla-color-text-1);
}

.topLeftPanelButtons {
	position: relative;
	z-index: 1;
	display: flex;
	width: 100%;
	overflow: hidden;
	align-items: center;
	justify-content: flex-start;
}

@media (min-width: 768px) {
	.topLeftPanel {
		max-width: 100%;
		width: auto;
	}
	.topLeftPanelButtons {
		width: auto;
	}
}

.topLeftPanel > button:nth-last-of-type(1) {
	position: relative;
	z-index: 2;
}

.topLeftPanelSeparator {
	color: var(--tl-color-text-3);
	pointer-events: none;
	padding: 0px 4px;
	flex-shrink: 0;
}

.topLeftPanelSeparator:nth-last-of-type(1) {
	margin-right: -4px;
}

.topLeftInputWrapper {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	min-width: 64px;
	height: 40px;
	margin-left: -4px;
	margin-right: -4px;
	flex-shrink: 2;
}

@media (max-width: 550px) {
	.topLeftPanelButtons:has(.topLeftOfflineLogo) .topLeftInputWrapper {
		display: none;
	}

	.topLeftPanelButtons:has(.topLeftOfflineLogo) .topLeftPanelSeparator:has(+ .topLeftInputWrapper) {
		display: none;
	}
}

.topLeftInputWrapper > * {
	width: 100%;
	overflow: hidden;
}

.topLeftInputNameWidthSetter {
	position: relative;
	z-index: 1;
	width: fit-content;
	max-width: 320px;
	width: 100%;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	padding: 0px 12px;
	font-weight: 800;
	flex-shrink: 0;
}

.topLeftInputNameWidthSetter:focus-visible {
	outline-offset: -4px;
	border-radius: 8px;
}

button.topLeftInputNameWidthSetter {
	background: none;
	border: none;
	padding: none;
	margin: none;
	opacity: 1;
	pointer-events: all;
	height: 100%;
	min-width: 0px;
	color: var(--tla-color-text-1);
}

.topLeftInputWrapper > div:nth-of-type(1) {
	position: absolute;
	z-index: 2;
	width: 100%;
	height: 100%;
}

.topLeftInputWrapper input {
	position: relative;
	padding: 0px 12px 1px 12px;
	height: 100%;
	font-weight: 800;
	color: var(--tla-color-text-1);
}

.topLeftInputWrapper input:focus-visible {
	outline: 1px solid var(--tl-color-primary);
	border-radius: 10px;
	outline-offset: -5px;
}

.topLeftInputWrapperEditable::after {
	display: block;
	content: '';
	position: absolute;
	inset: 4px;
	background-color: transparent;
	border-radius: var(--tl-radius-2);
}

.topLeftInputWrapperEditable button {
	cursor: pointer;
}

@media (hover: hover) {
	.topLeftInputWrapperEditable:hover:not(:focus-within)::after {
		background-color: var(--tl-color-muted-2);
	}
}

/* .inputWrapper:focus-within::after {
	background-color: var(--tl-color-muted-2);
} */

/* -------------------- Main Menu ------------------- */

.topLeftMainMenuTrigger {
	background: none;
	border: none;
	position: relative;
	outline: none;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tl-color-text-3);
	flex: 0 0 auto;
	z-index: 3;
	padding: 0px;
	cursor: pointer;
	margin-left: -4px;
}

.topLeftMainMenuTrigger:focus-visible {
	outline: 2px solid var(--tl-color-focus);
	outline-offset: -5px;
	border-radius: 10px;
}

.topLeftMainMenuTrigger::after {
	content: '';
	position: absolute;
	inset: 4px;
	border-radius: var(--tl-radius-2);
}

@media (hover: hover) {
	.topLeftMainMenuTrigger:hover {
		color: var(--tla-color-text-1);
	}

	.topLeftMainMenuTrigger:hover::after {
		background-color: var(--tl-color-muted-2);
	}
}

.topLeftMainMenuTrigger[data-state='open']::after {
	background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
}

.offlineIndicatorWrapper {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	padding-top: 3px;
	height: fit-content;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

@media (max-width: 1080px) {
	.offlineIndicatorWrapper {
		padding-top: 44px;
	}
}

/* ------------------- Top right ------------------ */

.topRightPanel {
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: all;
	padding-top: 4px;
	padding-right: 6px;
}

@media (max-width: 767px) {
	.topRightPanel {
		padding-right: 4px;
	}
}

/* ------------- Signed out share button ------------ */

.topRightAnonShareButton {
	margin-top: 1px;
	flex: 0 0 auto;
	position: relative;
	height: 40px;
	width: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	position: relative;
	cursor: pointer;
	z-index: 1;
	color: var(--tla-color-text-1);
}

.topRightAnonShareButton::before {
	display: block;
	content: '';
	position: absolute;
	inset: 2px 2px;
	border-radius: 6px;
	z-index: 0;
	pointer-events: none;
}

.topRightAnonShareButton::after {
	display: block;
	content: '';
	position: absolute;
	top: 4px;
	left: 4px;
	right: 4px;
	bottom: 4px;
	border-radius: 6px;
	background-color: var(--tla-color-hover-1);
	z-index: 0;
	pointer-events: none;
	visibility: hidden;
}

.topRightAnonShareButton[data-state='open']::after {
	background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
	visibility: visible;
}

@media (hover: hover) {
	.topRightAnonShareButton:hover::after {
		visibility: visible;
	}
}

@media (max-width: 550px) {
	.topRightAnonShareButton {
		display: none;
	}
}
